/*
 * @Description: 创建对象构造函数模式
 * @Author: rendc
 * @Date: 2021-09-03 09:55:17
 * @LastEditors: rendc
 * @LastEditTime: 2021-09-03 15:31:02
 */
function Person (name, age, gender) {
  this.name = name;
  this.age = age;
  this.gender = gender;
  this.sayName = function () {
    console.log(this.name);
  }
}

var p1 = new Person('terry', 23, '男');
p1.sayName();
console.log(p1);
console.log(typeof p1);









